(C) 1996 AROS - The Amiga Replacement OS


NAME
#include <sys/types.h>
#include <stdlib.h>
void * realloc()
SYNOPSIS
void * oldmem
size_t size

FUNCTION
Change the size of an allocated part of memory. The memory must have been allocated by malloc() or calloc(). If you reduce the size, the old contents will be lost. If you enlarge the size, the new contents will be undefined.

INPUTS
oldmen
What you got from malloc() or calloc().
size
The new size.
RESULT
A pointer to the allocated memory or NULL. If you don't need the memory anymore, you can pass this pointer to free(). If you don't, the memory will be freed for you when the application exits.

NOTES
If you get NULL, the memory at oldmem will not have been freed and can still be used.

EXAMPLE
BUGS
SEE ALSO
free(), malloc(), calloc()
INTERNALS
HISTORY
01.01.1997 ldp
Changed clib to proto
12.12.1996 aros
ANSI expects these functions in stdlib.h
10.12.1996 aros
Moved #include into first column to allow makedepend to see it.
23.10.1996 aros
Use AROS_ALIGN() to align pointers
19.10.1996 aros
New functions: realloc(), memcpy() and calloc()